<!DOCTYPE html>
<html lang="en">
<head>
<title>WebView4Delphi: uWVTypeLibrary: Interface ICoreWebView2NavigationCompletedEventArgs2</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="ICoreWebView2NavigationCompletedEventArgs2"></span><h1 class="cio">Interface ICoreWebView2NavigationCompletedEventArgs2</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uWVTypeLibrary.html">uWVTypeLibrary</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type ICoreWebView2NavigationCompletedEventArgs2 = interface(<a class="normal" href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs.html">ICoreWebView2NavigationCompletedEventArgs</a>)</code></p>
<h2 class="description">Description</h2>
<p>
 This is an interface for the StatusCode property of ICoreWebView2NavigationCompletedEventArgs </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs2">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs2</a>&quot;&gt;See the ICoreWebView2NavigationCompletedEventArgs2 article.)</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">IUnknown</li>
<li class="ancestor"><a class="normal" href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs.html">ICoreWebView2NavigationCompletedEventArgs</a></li>
<li class="thisitem">ICoreWebView2NavigationCompletedEventArgs2</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs2.html#Get_HttpStatusCode-SYSINT-">Get_HttpStatusCode</a></strong>(out http_status_code: SYSINT): HResult; stdcall;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_HttpStatusCode-SYSINT-"></span><code>function <strong>Get_HttpStatusCode</strong>(out http_status_code: SYSINT): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The HTTP status code of the navigation if it involved an HTTP request. For instance, this will usually be 200 if the request was successful, 404 if a page was not found, etc. See <a href="https://developer.mozilla.org/docs/Web/HTTP/Status">https://developer.mozilla.org/docs/Web/HTTP/Status</a> for a list of common status codes.

<p>The `HttpStatusCode` property will be 0 in the following cases: * The navigation did not involve an HTTP request. For instance, if it was a navigation to a <a href="file://">file://</a> URL, or if it was a same-document navigation. * The navigation failed before a response was received. For instance, if the hostname was not found, or if there was a network error.

<p>In those cases, you can get more information from the `IsSuccess` and `WebErrorStatus` properties.

<p>If the navigation receives a successful HTTP response, but the navigated page calls `window.stop()` before it finishes loading, then `HttpStatusCode` may contain a success code like 200, but `IsSuccess` will be FALSE and `WebErrorStatus` will be `COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED`.

<p>Since WebView2 handles HTTP continuations and redirects automatically, it is unlikely for `HttpStatusCode` to ever be in the 1xx or 3xx ranges. </p>
<h6 class="description_section">Attributes</h6>
<dl class="attributes">
  <dt>GUID['{FDF8B738-EE1E-4DB2-A329-8D7D7B74D792}']</dt>
  <dd></dd>
</dl>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
